<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>个人主页--已发送私信</title>
    <link rel="icon" href="./favicon/favicon.ico" type="image/x-icon">
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="container py-4">
<h4 class="mb-3">已发送私信</h4>

<c:if test="${empty sentList}">
    <div class="alert alert-info">暂无记录</div>
</c:if>

<c:forEach items="${sentList}" var="sent">
    <div class="card mb-2">
        <div class="card-body">
            <div class="d-flex justify-content-between">
                <span class="fw-bold">发给：${sent.receiverName}</span>
                <small class="text-muted">
                    <i class="bi bi-calendar"></i>
                        ${sent.sentTime}
                </small>

            </div>
            <div class="mt-1">${sent.content}</div>
        </div>
    </div>
</c:forEach>

<a href="javascript:history.back()" class="btn btn-secondary btn-sm mt-3">返回</a>
</body>
</html>